home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1997: The Complete Utilities Toolkit / macworld-complete-utilities-1997.iso / Desktop ⁄ Finder / FinderProgressBar 2.0 / FPB.h < prev    next >
Encoding:
Text File  |  1995-03-10  |  2.2 KB  |  43 lines  |  [TEXT/MMCC]

  1. /*****************************************************************************************************
  2. *                                                                                                    *
  3. * FPB.h - Copyright 1993 - 1995 Chris Larson (larson@cs.ucla.edu), All rights reserved               *
  4. *                                                                                                    *
  5. * This is the private header file for a CDEF which mimics the progress bar used by the Finder. This  *
  6. * file and compiled derivatives may be freely used within any freeware/shareware/postcardware/… as   *
  7. * long as you mention my name in your credits. Neither this source nor its compiled derivatives are  *
  8. * in the public domain and may not be use in any form in public domain software. Neither this source *
  9. * nor its compiled derivatives may be used in any form in a commercial product without the expressed,*
  10. * written consent of the author (me).                                                                *
  11. *                                                                                                    *
  12. * Version 2.0 -- March 10, 1995.                                                                     *
  13. *                                                                                                    *
  14. *****************************************************************************************************/
  15.  
  16. // Constants
  17.  
  18. #define kIsColorPort 0xC000    // If these bits in GrafPort.portBits.rowBytes are set, its a CGrafPort.
  19.  
  20. #define    kBarberPoleStripeWidth    8
  21.  
  22. // Function Prototypes
  23.  
  24. pascal long main(short varCode, ControlHandle theControlHandle, short message, long param);
  25.  
  26. void BeginDraw(ControlHandle theControlHandle, short varCode);
  27.  
  28. void DrawNormalBar(ControlPtr theControl, RGBColorPtr barColor, RGBColorPtr bodyColor);
  29.  
  30. void DrawBarberPoleBar(ControlPtr theControl, RGBColorPtr barColor, RGBColorPtr bodyColor);
  31.  
  32. #ifdef    powerc
  33.  
  34.     short CalculateBarBoundry(short boxLeft, short boxRight, ControlPtr theControl);
  35.  
  36. #else
  37.  
  38.     asm short CalculateBarBoundry(short boxLeft, short boxRight, ControlPtr theControl);
  39.  
  40. #endif
  41.  
  42. RGBColor* FindColorInTable(CCTabHandle colorTable, short id);
  43.